import request from '@/utils/request'

// 创建客人身份证信息
export function createIdcard(data) {
  return request({
    url: '/team/idcard/create',
    method: 'post',
    data: data
  })
}
// 批量修改创建客人身份证信息
export function createBatchIdcard(data) {
  return request({
    url: '/team/idcard/createBatch',
    method: 'put',
    data: data
  })
}
// 更新客人身份证信息
export function updateIdcard(data) {
  return request({
    url: '/team/idcard/update',
    method: 'put',
    data: data
  })
}

// 删除客人身份证信息
export function deleteIdcard(id) {
  return request({
    url: '/team/idcard/delete?id=' + id,
    method: 'delete'
  })
}

/** 批量删除客人身份证信息 */
export function deleteIdcardList(ids) {
  return request({
    url: `/team/idcard/delete-list?ids=${ids.join(',')}`,
    method: 'delete'
  })
}

// 获得客人身份证信息
export function getIdcard(id) {
  return request({
    url: '/team/idcard/get?id=' + id,
    method: 'get'
  })
}

// 获得客人身份证信息分页
export function getIdcardPage(params) {
  return request({
    url: '/team/idcard/page',
    method: 'get',
    params
  })
}
// 导出客人身份证信息 Excel
export function exportIdcardExcel(params) {
  return request({
    url: '/team/idcard/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}